//
//  ButtonCell.m
//  LvXi_newVersion
//
//  Created by 王敏 on 16/8/15.
//  Copyright © 2016年 SJT. All rights reserved.
//

#import "ButtonCell.h"
@interface ButtonCell()
@property (weak, nonatomic) IBOutlet UIButton *specification;
@property (weak, nonatomic) IBOutlet UIButton *evaluate;
@property(nonatomic,strong)UIView * underLine;
@end
@implementation ButtonCell

-(void)awakeFromNib{
    [super awakeFromNib];
    self.backgroundColor = HexColor(@"#FFFFFF");
    self.contentView.backgroundColor = HexColor(@"#FFFFFF");
    self.cellHeight = 40;
    self.specification.backgroundColor = HexColor(@"#FFFFFF");
    self.evaluate.backgroundColor = HexColor(@"#FFFFFF");
    UIView * underLine = [[UIView alloc] initWithFrame:CGRectMake(0, self.cellHeight-2, ScreenWidth*0.5, 2)];
    underLine.backgroundColor = HexColor(@"#3CB434");
    [self.contentView addSubview:underLine];
    self.underLine = underLine;
}

- (IBAction)specificationClick:(UIButton *)sender {
    [UIView animateWithDuration:0.2 animations:^{
        self.underLine.x = 0;
    }];
//    sender.backgroundColor = RGBColor(234, 234, 234);;
//    self.evaluate.backgroundColor = [UIColor whiteColor];
}

- (IBAction)evaluateClick:(UIButton *)sender {
    [UIView animateWithDuration:0.2 animations:^{
        self.underLine.x = ScreenWidth*0.5;
    }];
//    sender.backgroundColor = RGBColor(234, 234, 234);;
//    self.specification.backgroundColor = [UIColor whiteColor];
}

@end
